type s=string //类型起一个别的名字
let str:s='123'

// 联合类型也能取别名
type all= boolean | string | number

let a:all= false
let b:all='123'

type stringType='123' | '456' |123

let c:stringType='123'